package ua.edu.nuos.jeetraining2012.cms.util.oauth;

import org.scribe.up.profile.AttributesDefinition;
import org.scribe.up.profile.BaseOAuthProfile;
import org.scribe.up.profile.CommonProfile;
import org.scribe.up.profile.Gender;

import java.util.Locale;

public class VkontakteProfile extends BaseOAuthProfile implements CommonProfile {

    private static final long serialVersionUID = -548478189554708977L;

    @Override
    protected AttributesDefinition getAttributesDefinition() {
        return new VkontakteAttributesDefinition();
    }

    @Override
    public String getEmail() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public String getFirstName() {
        return (String) get(VkontakteAttributesDefinition.FIRSTNAME);
    }

    @Override
    public String getFamilyName() {
        return getLastName();
    }

    @Override
    public String getDisplayName() {
        return getScreenname();
    }

    @Override
    public String getUsername() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public Gender getGender() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public Locale getLocale() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public String getLastName() {
        return (String) get(VkontakteAttributesDefinition.LASTNAME);
    }

    public String getNickname() {
        return (String) get(VkontakteAttributesDefinition.NICKNAME);
    }

    public String getScreenname() {
        return (String) get(VkontakteAttributesDefinition.SCREENNAME);
    }

    public String getSex() {
        return (String) get(VkontakteAttributesDefinition.SEX);
    }

    public String getBDATE() {
        return (String) get(VkontakteAttributesDefinition.BDATE);
    }

    public String getCity() {
        return (String) get(VkontakteAttributesDefinition.CITY);
    }

    public String getCountry() {
        return (String) get(VkontakteAttributesDefinition.COUNTRY);
    }

    public String getTimezone() {
        return (String) get(VkontakteAttributesDefinition.TIMEZONE);
    }

    public String getPhoto() {
        return (String) get(VkontakteAttributesDefinition.PHOTO);
    }

    public String getPhotoMedium() {
        return (String) get(VkontakteAttributesDefinition.PHOTO_MEDIUM);
    }

    public String getPhotoBig() {
        return (String) get(VkontakteAttributesDefinition.PHOTO_BIG);
    }

    public String getHasmobile() {
        return (String) get(VkontakteAttributesDefinition.HASMOBILE);
    }

    public String getRate() {
        return (String) get(VkontakteAttributesDefinition.RATE);
    }

    public String getContacts() {
        return (String) get(VkontakteAttributesDefinition.CONTACTS);
    }

    public String getEducation() {
        return (String) get(VkontakteAttributesDefinition.EDUCATION);
    }

    public String getOnline() {
        return (String) get(VkontakteAttributesDefinition.ONLINE);
    }

    public String getCounters() {
        return (String) get(VkontakteAttributesDefinition.COUNTERS);
    }

    public String getPictureUrl() {
        return getPhoto();
    }

    public String getProfileUrl() {
        return null;
    }

    public String getLocation() {
        return getCity() + "," + getCountry();
    }

}
